<?php
/**
 * Created by PhpStorm.
 * User: kongqi
 * Date: 2019/11/30
 * Time: 2:59
 */

namespace App\Plugin\HostServer\Front;

use App\Models\ServerMemory;
use App\Models\ServerType;
use App\Models\ServerTypeItem;


class MainServerController extends BaseController
{
    public function main()
    {
        return $this->display();
    }

    public function get_info()
    {
        $id = \request('id');
        $data = ServerType::getServer($id);
        return json_encode(['data' => $data]);
    }

    public function get_memory()
    {
        $id = \request('id');
        $data = ServerMemory::getServerMemory($id);
        return json_encode(['data' => $data]);
    }


}